using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using bitzhuwei.Compiler;

namespace bitzhuwei.AnsiCFormat {
    /// <summary>
    /// Correspond to the Vn node labeled_statement in the grammar(AnsiC).
    /// </summary>
    internal abstract partial class Vnlabeled_statement : Vnstatement {

        /// <summary>
        /// [178]=labeled_statement : 'identifier' ':' statement ;
        /// </summary>
        public class id_ : Vnlabeled_statement {
            private readonly Token r2;
            private readonly Token r1;
            private readonly Vnstatement r0;

            /// <summary>
            /// [178]=labeled_statement : 'identifier' ':' statement ;
            /// </summary>
            /// <param name="r2"></param>
            /// <param name="r1"></param>
            /// <param name="r0"></param>
            public id_(Token r2, Token r1, Vnstatement r0) {
                this.r2 = r2;
                this.r1 = r1;
                this.r0 = r0;
                this._scope = new TokenRange(r2, r0);
            }

            private TokenRange _scope;
            public override TokenRange Scope => _scope;

            public override void Format(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override void FullFormat(BlankConfig preConfig, TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override IEnumerable<string> YieldTokens(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }
        }
        /// <summary>
        /// [179]=labeled_statement : 'case' constant_expression ':' statement ;
        /// </summary>
        public class case_ : Vnlabeled_statement {
            private readonly Token r3;
            private readonly Vnconstant_expression r2;
            private readonly Token r1;
            private readonly Vnstatement r0;

            /// <summary>
            /// [179]=labeled_statement : 'case' constant_expression ':' statement ;
            /// </summary>
            /// <param name="r3"></param>
            /// <param name="r2"></param>
            /// <param name="r1"></param>
            /// <param name="r0"></param>
            public case_(Token r3, Vnconstant_expression r2, Token r1, Vnstatement r0) {
                this.r3 = r3;
                this.r2 = r2;
                this.r1 = r1;
                this.r0 = r0;
                this._scope = new TokenRange(r3, r0);
            }

            private TokenRange _scope;
            public override TokenRange Scope => _scope;

            public override void Format(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override void FullFormat(BlankConfig preConfig, TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override IEnumerable<string> YieldTokens(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }
        }
        /// <summary>
        /// [180]=labeled_statement : 'default' ':' statement ;
        /// </summary>
        public class default_ : Vnlabeled_statement {
            private readonly Token r2;
            private readonly Token r1;
            private readonly Vnstatement r0;

            /// <summary>
            /// [180]=labeled_statement : 'default' ':' statement ;
            /// </summary>
            /// <param name="r2"></param>
            /// <param name="r1"></param>
            /// <param name="r0"></param>
            public default_(Token r2, Token r1, Vnstatement r0) {
                this.r2 = r2;
                this.r1 = r1;
                this.r0 = r0;
                this._scope = new TokenRange(r2, r0);
            }

            private TokenRange _scope;
            public override TokenRange Scope => _scope;

            public override void Format(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override void FullFormat(BlankConfig preConfig, TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }

            public override IEnumerable<string> YieldTokens(TextWriter writer, FormatContext context) {
                throw new NotImplementedException();
            }
        }
    }
}
